function [v, flag] = read_single_v30(datapath, senno)

%datapath: the directory where the data files are stored
%senno: the sensor number, also the file name

% return v (2880 x 1)

% For volumn data, the number of vehicles that pass a single point in a
%                  given time interval
% one data point is for 30 sec
% A negative value (-1) indicates missing data.
% data outside the range 0~40 can be considered 'bad'
% ref: http://www.d.umn.edu/~tkwon/TMCdata/Traffic.html


filename = sprintf('%s/%s.v30',datapath, senno);
fid = fopen(filename, 'r');
if fid == -1
    v=zeros(2880,1);
    flag = 0;
    warning('%s.v30 may not exist\n', senno)

else
    v = fread(fid, 2880, 'bit8');
    fclose(fid);
    flag = 1;
end